//导航选项卡
				function Tab(a){
//					定义默认配置
				this.defalut={
					"btnName":"ul_nav li",
					"content":".index_content"
				}
//				判断用户输入参数a是否为object
				if(typeof a!="object" ||a==null){
					throw Error("请输入对象");
					return
				}
				//mowei
				var t=this;
				this.option={};
				//判断用户传进来的属性跟默认值进行比较
				//如果有，那就取用户传进来的值
				for(key in this.defalut){
					//console.log(key)
					//console.log(a[key])
					if(a[key]){
						t.option[key]=a[key]
					}else{
						t.option[key]=t.defalut[key]
					}
				}
				console.log(this.option)
		
		this.lis  = document.querySelectorAll(".ul_nav li");
		this.line = document.querySelectorAll(".ul_nav line");
		this.div = document.querySelectorAll(".index_content");
		console.log(this.div)
		var isBlock = false;
		this.init()
		}
		Tab.prototype.init=function(){
			//将当前的this用变量装起来，防止后面的this的指向改变
			var that = this;
			this.lis.forEach(function(el,index){
				el.addEventListener("click",function(){
					//清除所有的active
					for(var i=0;i<that.lis.length;i++){
						that.lis[i].classList.remove("active");
						that.div[i].classList.remove("active");					
						that.div[i].style.display="none";
						
					}
					el.classList.add("active");
					el.style.display="inline-block";				
					that.div[index].classList.add("active");
					that.div[index].style.display="block";
					
					
						
					
					
				})
			});
		}
		//mowei
		var tl = new Tab({
			btnName:"ul_nav.li"
		
		});
